#include <stdio.h>

#include "tx_api.h"
#include "nx_api.h"
#include "tls_test_utility.h"
#include "nx_secure_tls_api.h"
#include "nx_secure_x509.h"

typedef struct
{
    const UCHAR *cert_data;
    UINT cert_data_length;
    const UCHAR **match_names;
    UINT match_names_count;
    const UCHAR **mismatch_names;
    UINT mismatch_names_count;
} X509_NAME_TEST_DATA;

static const UCHAR rtos_com_der[] = {
    0x30, 0x82, 0x07, 0xc0, 0x30, 0x82, 0x06, 0xa8, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x10, 0x0c, 0x24, 0xae, 0x03, 0xf7, 0xa2, 0x2e, 0x95, 0x72,
    0x15, 0xb8, 0x54, 0x59, 0x34, 0x6d, 0x61, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x81,
    0x92, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x47, 0x42, 0x31, 0x1b, 0x30, 0x19, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13,
    0x12, 0x47, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x4d, 0x61, 0x6e,
    0x63, 0x68, 0x65, 0x73, 0x74, 0x65, 0x72, 0x31, 0x10, 0x30, 0x0e, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x13, 0x07, 0x53, 0x61, 0x6c, 0x66, 0x6f, 0x72,
    0x64, 0x31, 0x1a, 0x30, 0x18, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x11,
    0x43, 0x4f, 0x4d, 0x4f, 0x44, 0x4f, 0x20, 0x43, 0x41, 0x20, 0x4c, 0x69,
    0x6d, 0x69, 0x74, 0x65, 0x64, 0x31, 0x38, 0x30, 0x36, 0x06, 0x03, 0x55,
    0x04, 0x03, 0x13, 0x2f, 0x43, 0x4f, 0x4d, 0x4f, 0x44, 0x4f, 0x20, 0x52,
    0x53, 0x41, 0x20, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x20,
    0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x53,
    0x65, 0x63, 0x75, 0x72, 0x65, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
    0x20, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x37, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x31, 0x30, 0x35, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30,
    0x82, 0x01, 0x32, 0x31, 0x11, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x04, 0x05,
    0x13, 0x08, 0x43, 0x31, 0x39, 0x39, 0x32, 0x36, 0x33, 0x38, 0x31, 0x13,
    0x30, 0x11, 0x06, 0x0b, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x3c,
    0x02, 0x01, 0x03, 0x13, 0x02, 0x55, 0x53, 0x31, 0x1b, 0x30, 0x19, 0x06,
    0x0b, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x3c, 0x02, 0x01, 0x02,
    0x13, 0x0a, 0x43, 0x61, 0x6c, 0x69, 0x66, 0x6f, 0x72, 0x6e, 0x69, 0x61,
    0x31, 0x1d, 0x30, 0x1b, 0x06, 0x03, 0x55, 0x04, 0x0f, 0x13, 0x14, 0x50,
    0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x20, 0x4f, 0x72, 0x67, 0x61, 0x6e,
    0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x0e, 0x30, 0x0c,
    0x06, 0x03, 0x55, 0x04, 0x11, 0x13, 0x05, 0x39, 0x32, 0x31, 0x32, 0x37,
    0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0a, 0x43,
    0x61, 0x6c, 0x69, 0x66, 0x6f, 0x72, 0x6e, 0x69, 0x61, 0x31, 0x12, 0x30,
    0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x53, 0x41, 0x4e, 0x20,
    0x44, 0x49, 0x45, 0x47, 0x4f, 0x31, 0x1c, 0x30, 0x1a, 0x06, 0x03, 0x55,
    0x04, 0x09, 0x13, 0x13, 0x31, 0x31, 0x34, 0x32, 0x33, 0x20, 0x57, 0x20,
    0x42, 0x65, 0x72, 0x6e, 0x61, 0x72, 0x64, 0x6f, 0x20, 0x43, 0x54, 0x31,
    0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x0d, 0x45, 0x78,
    0x70, 0x72, 0x65, 0x73, 0x73, 0x20, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x31,
    0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x0d, 0x45, 0x78,
    0x70, 0x72, 0x65, 0x73, 0x73, 0x20, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x31,
    0x25, 0x30, 0x23, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x1c, 0x50, 0x4f,
    0x53, 0x49, 0x54, 0x49, 0x56, 0x45, 0x20, 0x45, 0x56, 0x20, 0x53, 0x53,
    0x4c, 0x20, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x44, 0x6f, 0x6d, 0x61,
    0x69, 0x6e, 0x31, 0x11, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13,
    0x08, 0x72, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01,
    0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01,
    0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01,
    0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xbb, 0x45, 0x6b, 0x8a, 0x97, 0x2d,
    0xb0, 0x4b, 0x2c, 0xb3, 0xcb, 0x2d, 0x1b, 0x74, 0x36, 0x10, 0xc6, 0xe5,
    0xaf, 0xbf, 0x5b, 0x8c, 0xc1, 0x79, 0x59, 0xa4, 0x0b, 0x94, 0xe1, 0xb9,
    0xa4, 0xa3, 0x4a, 0xe7, 0xc3, 0xfd, 0x14, 0xe9, 0x40, 0xc2, 0x8c, 0xf6,
    0x15, 0x2e, 0xd2, 0x16, 0xad, 0x24, 0xa6, 0x96, 0xc5, 0x17, 0x33, 0x3a,
    0x4a, 0x8c, 0x58, 0x5d, 0xed, 0xb9, 0xc2, 0xcd, 0x08, 0xd9, 0x22, 0x94,
    0x9c, 0xec, 0x4a, 0x81, 0xc5, 0x1b, 0x1f, 0x8f, 0xb6, 0xd0, 0x21, 0x63,
    0x29, 0xc9, 0x2d, 0x7f, 0xca, 0xe0, 0x9c, 0x06, 0x1c, 0x28, 0xaa, 0xd5,
    0xd5, 0x76, 0x00, 0x09, 0xb8, 0xf2, 0x43, 0x9c, 0xf5, 0xae, 0xbd, 0xbb,
    0x76, 0x4b, 0x51, 0x99, 0xe8, 0x2a, 0xf9, 0xfc, 0x04, 0x71, 0xaa, 0x32,
    0x71, 0x52, 0xd3, 0x4c, 0x3c, 0xc9, 0xdd, 0x48, 0xd4, 0xaf, 0xfc, 0x0b,
    0x27, 0x33, 0xf1, 0x34, 0x76, 0x22, 0xef, 0xf8, 0x9c, 0xc0, 0x86, 0x1d,
    0xd7, 0x46, 0xe1, 0x83, 0x4d, 0xc2, 0x7b, 0x93, 0x48, 0xe7, 0x57, 0xdd,
    0xcf, 0x72, 0x25, 0x66, 0x68, 0x24, 0xa4, 0xd2, 0x82, 0xa9, 0x62, 0x18,
    0xc1, 0x03, 0xa4, 0x84, 0xe0, 0x25, 0x8a, 0xa3, 0xf8, 0xbf, 0x0c, 0x9a,
    0x20, 0xfe, 0x52, 0x31, 0x56, 0x16, 0x9e, 0x51, 0x3e, 0x30, 0x0c, 0xbb,
    0x06, 0xb1, 0x1e, 0x94, 0x5d, 0x64, 0x0f, 0xaf, 0xa3, 0xf8, 0xac, 0xd5,
    0xa2, 0xaa, 0x2c, 0x2b, 0xb9, 0x24, 0x0f, 0x14, 0x74, 0xfa, 0x01, 0xb2,
    0x8a, 0xc0, 0xab, 0x65, 0x3e, 0xa9, 0xa1, 0x96, 0x82, 0x74, 0x57, 0xf5,
    0x68, 0x69, 0x9f, 0xdf, 0x2a, 0xee, 0x90, 0x83, 0xfa, 0x25, 0x00, 0xda,
    0x37, 0xfa, 0x38, 0xdc, 0xca, 0xb2, 0x15, 0xba, 0x38, 0xb9, 0xc8, 0xb6,
    0x8f, 0x9a, 0xfb, 0x16, 0x05, 0x0b, 0x1a, 0x6d, 0x53, 0xf1, 0x02, 0x03,
    0x01, 0x00, 0x01, 0xa3, 0x82, 0x03, 0x6d, 0x30, 0x82, 0x03, 0x69, 0x30,
    0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14,
    0x39, 0xda, 0xff, 0xca, 0x28, 0x14, 0x8a, 0xa8, 0x74, 0x13, 0x08, 0xb9,
    0xe4, 0x0e, 0xa9, 0xd2, 0xfa, 0x7e, 0x9d, 0x69, 0x30, 0x1d, 0x06, 0x03,
    0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xf7, 0x40, 0xde, 0xed, 0x52,
    0xa8, 0xe3, 0x3f, 0x1d, 0xe9, 0xb2, 0x72, 0x6d, 0x37, 0xad, 0x6d, 0xc4,
    0x2f, 0x1c, 0xf4, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01,
    0xff, 0x04, 0x04, 0x03, 0x02, 0x05, 0xa0, 0x30, 0x0c, 0x06, 0x03, 0x55,
    0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x1d, 0x06,
    0x03, 0x55, 0x1d, 0x25, 0x04, 0x16, 0x30, 0x14, 0x06, 0x08, 0x2b, 0x06,
    0x01, 0x05, 0x05, 0x07, 0x03, 0x01, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05,
    0x05, 0x07, 0x03, 0x02, 0x30, 0x4f, 0x06, 0x03, 0x55, 0x1d, 0x20, 0x04,
    0x48, 0x30, 0x46, 0x30, 0x3b, 0x06, 0x0c, 0x2b, 0x06, 0x01, 0x04, 0x01,
    0xb2, 0x31, 0x01, 0x02, 0x01, 0x05, 0x01, 0x30, 0x2b, 0x30, 0x29, 0x06,
    0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x02, 0x01, 0x16, 0x1d, 0x68,
    0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72,
    0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6f, 0x64, 0x6f, 0x2e, 0x63, 0x6f, 0x6d,
    0x2f, 0x43, 0x50, 0x53, 0x30, 0x07, 0x06, 0x05, 0x67, 0x81, 0x0c, 0x01,
    0x01, 0x30, 0x56, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x4f, 0x30, 0x4d,
    0x30, 0x4b, 0xa0, 0x49, 0xa0, 0x47, 0x86, 0x45, 0x68, 0x74, 0x74, 0x70,
    0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x6f, 0x64,
    0x6f, 0x63, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x4f, 0x4d, 0x4f,
    0x44, 0x4f, 0x52, 0x53, 0x41, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65,
    0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53,
    0x65, 0x63, 0x75, 0x72, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43,
    0x41, 0x2e, 0x63, 0x72, 0x6c, 0x30, 0x81, 0x87, 0x06, 0x08, 0x2b, 0x06,
    0x01, 0x05, 0x05, 0x07, 0x01, 0x01, 0x04, 0x7b, 0x30, 0x79, 0x30, 0x51,
    0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x02, 0x86, 0x45,
    0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x74, 0x2e, 0x63,
    0x6f, 0x6d, 0x6f, 0x64, 0x6f, 0x63, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
    0x43, 0x4f, 0x4d, 0x4f, 0x44, 0x4f, 0x52, 0x53, 0x41, 0x45, 0x78, 0x74,
    0x65, 0x6e, 0x64, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
    0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x53, 0x65, 0x72,
    0x76, 0x65, 0x72, 0x43, 0x41, 0x2e, 0x63, 0x72, 0x74, 0x30, 0x24, 0x06,
    0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x86, 0x18, 0x68,
    0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6f, 0x63, 0x73, 0x70, 0x2e, 0x63,
    0x6f, 0x6d, 0x6f, 0x64, 0x6f, 0x63, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x30,
    0x32, 0x06, 0x03, 0x55, 0x1d, 0x11, 0x04, 0x2b, 0x30, 0x29, 0x82, 0x08,
    0x72, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x10, 0x65, 0x78,
    0x70, 0x72, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0b, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x78, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x81, 0x06, 0x0a, 0x2b, 0x06, 0x01,
    0x04, 0x01, 0xd6, 0x79, 0x02, 0x04, 0x02, 0x04, 0x82, 0x01, 0x71, 0x04,
    0x82, 0x01, 0x6d, 0x01, 0x6b, 0x00, 0x77, 0x00, 0xa4, 0xb9, 0x09, 0x90,
    0xb4, 0x18, 0x58, 0x14, 0x87, 0xbb, 0x13, 0xa2, 0xcc, 0x67, 0x70, 0x0a,
    0x3c, 0x35, 0x98, 0x04, 0xf9, 0x1b, 0xdf, 0xb8, 0xe3, 0x77, 0xcd, 0x0e,
    0xc8, 0x0d, 0xdc, 0x10, 0x00, 0x00, 0x01, 0x5f, 0x97, 0x7f, 0xd8, 0x5e,
    0x00, 0x00, 0x04, 0x03, 0x00, 0x48, 0x30, 0x46, 0x02, 0x21, 0x00, 0xbe,
    0xdd, 0x8a, 0x4c, 0x35, 0x3a, 0xc5, 0x88, 0x0d, 0x75, 0x64, 0x63, 0x4b,
    0x25, 0xf4, 0x96, 0x1f, 0x77, 0x36, 0xe2, 0x9d, 0xa2, 0x7b, 0x34, 0xa7,
    0x4a, 0x3d, 0x11, 0xdb, 0x41, 0x66, 0x8c, 0x02, 0x21, 0x00, 0xa8, 0xb7,
    0x29, 0x36, 0x8f, 0xdf, 0x29, 0xa0, 0x40, 0x39, 0xd6, 0x6a, 0x40, 0xfb,
    0x2a, 0x4e, 0xc3, 0xf4, 0xd9, 0xfa, 0x1a, 0x91, 0x06, 0x15, 0xe0, 0xc3,
    0x3b, 0xde, 0x32, 0x46, 0x55, 0xee, 0x00, 0x77, 0x00, 0x56, 0x14, 0x06,
    0x9a, 0x2f, 0xd7, 0xc2, 0xec, 0xd3, 0xf5, 0xe1, 0xbd, 0x44, 0xb2, 0x3e,
    0xc7, 0x46, 0x76, 0xb9, 0xbc, 0x99, 0x11, 0x5c, 0xc0, 0xef, 0x94, 0x98,
    0x55, 0xd6, 0x89, 0xd0, 0xdd, 0x00, 0x00, 0x01, 0x5f, 0x97, 0x7f, 0xd6,
    0x41, 0x00, 0x00, 0x04, 0x03, 0x00, 0x48, 0x30, 0x46, 0x02, 0x21, 0x00,
    0xf5, 0x1c, 0x0e, 0x6e, 0x73, 0x4f, 0x51, 0xf9, 0x25, 0x2c, 0x9e, 0x62,
    0xf3, 0x75, 0x2a, 0xd9, 0x14, 0xf4, 0x45, 0xfc, 0x81, 0xc1, 0xb4, 0x13,
    0x0d, 0x5b, 0x2c, 0xe9, 0x6d, 0xa8, 0x44, 0x56, 0x02, 0x21, 0x00, 0xa4,
    0x88, 0x84, 0x9f, 0x6c, 0x97, 0x57, 0x4e, 0x4c, 0x92, 0x87, 0x67, 0xab,
    0xf5, 0xfa, 0xe1, 0x93, 0x93, 0xfd, 0xc1, 0x97, 0xca, 0xcb, 0x6e, 0x56,
    0xd5, 0xe2, 0xca, 0xdd, 0x79, 0x0a, 0xa2, 0x00, 0x77, 0x00, 0xee, 0x4b,
    0xbd, 0xb7, 0x75, 0xce, 0x60, 0xba, 0xe1, 0x42, 0x69, 0x1f, 0xab, 0xe1,
    0x9e, 0x66, 0xa3, 0x0f, 0x7e, 0x5f, 0xb0, 0x72, 0xd8, 0x83, 0x00, 0xc4,
    0x7b, 0x89, 0x7a, 0xa8, 0xfd, 0xcb, 0x00, 0x00, 0x01, 0x5f, 0x97, 0x7f,
    0xd8, 0x43, 0x00, 0x00, 0x04, 0x03, 0x00, 0x48, 0x30, 0x46, 0x02, 0x21,
    0x00, 0xf6, 0x62, 0x4c, 0x42, 0xa8, 0xa0, 0x04, 0x0a, 0x94, 0x9f, 0x75,
    0x04, 0x63, 0xfa, 0x0c, 0x17, 0xa6, 0x94, 0x4c, 0xf6, 0x98, 0x80, 0x77,
    0xbe, 0x08, 0x92, 0xdf, 0x2b, 0x4e, 0x74, 0x60, 0x81, 0x02, 0x21, 0x00,
    0xc2, 0xc2, 0x85, 0x4d, 0xb0, 0x4f, 0xb2, 0xcb, 0xbb, 0x53, 0xa3, 0xfb,
    0x06, 0x96, 0xc4, 0xc3, 0x7c, 0x7f, 0xd1, 0x97, 0x97, 0x2b, 0xd3, 0x25,
    0xf3, 0x89, 0x75, 0x2e, 0xed, 0x35, 0x8c, 0x74, 0x30, 0x0d, 0x06, 0x09,
    0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03,
    0x82, 0x01, 0x01, 0x00, 0x7f, 0xa7, 0x8f, 0xed, 0x69, 0x01, 0x00, 0x60,
    0x15, 0x9d, 0x03, 0x02, 0x05, 0x40, 0x87, 0x4d, 0x0c, 0x0c, 0xe9, 0xf1,
    0x1e, 0x89, 0x64, 0xb4, 0xcb, 0x19, 0x28, 0x52, 0xa9, 0x02, 0xc6, 0x14,
    0x11, 0x37, 0x0f, 0xac, 0x5d, 0xc3, 0x4b, 0xde, 0x1a, 0x57, 0x67, 0x24,
    0xf7, 0x9a, 0x2c, 0x2f, 0xbe, 0xe2, 0x9e, 0x46, 0x66, 0xfa, 0xea, 0xc3,
    0xe2, 0xc1, 0x37, 0xc3, 0x35, 0x46, 0xc8, 0x7c, 0xac, 0xc8, 0x88, 0x49,
    0x32, 0xa6, 0x42, 0x4a, 0xc7, 0x0e, 0xbf, 0x65, 0xfa, 0x52, 0x21, 0x02,
    0x45, 0x6a, 0x57, 0x38, 0x13, 0x19, 0x9c, 0x99, 0xe7, 0x7e, 0x3b, 0x49,
    0x08, 0xa6, 0x76, 0xdf, 0xd8, 0x4e, 0x95, 0xbe, 0x82, 0xb8, 0xd4, 0x88,
    0x17, 0x1e, 0xad, 0xdd, 0xda, 0x7b, 0x8e, 0xde, 0xe2, 0x6d, 0x52, 0x2e,
    0x67, 0xc8, 0x9d, 0x41, 0xfb, 0xa5, 0xb6, 0x27, 0x0f, 0x05, 0x96, 0xe9,
    0x51, 0x6e, 0xe1, 0x24, 0x82, 0x88, 0x0a, 0x98, 0x28, 0xb1, 0x72, 0x4e,
    0x65, 0x7c, 0xf4, 0x69, 0x98, 0x40, 0x94, 0xa6, 0x8c, 0x24, 0xb9, 0x91,
    0x47, 0x42, 0x81, 0x29, 0xbc, 0x4e, 0x55, 0x78, 0x8b, 0x90, 0x0c, 0x80,
    0xbb, 0xc6, 0xfe, 0xa3, 0x23, 0xa7, 0xbe, 0x0d, 0x0f, 0xd6, 0x92, 0x19,
    0x40, 0xe3, 0xe2, 0x32, 0x57, 0x31, 0x2d, 0x32, 0x15, 0x92, 0x6e, 0x60,
    0x82, 0x39, 0x75, 0x6a, 0x2e, 0xf5, 0x5f, 0x57, 0x5a, 0x1c, 0xc2, 0xb8,
    0x07, 0x63, 0x33, 0x59, 0xef, 0x82, 0xbd, 0xcb, 0x21, 0x61, 0x22, 0xba,
    0xac, 0xd0, 0xda, 0xf7, 0x50, 0x1f, 0xd7, 0x88, 0x36, 0x4b, 0xa0, 0xe9,
    0xf8, 0x92, 0x34, 0x2c, 0x26, 0xee, 0xcf, 0xc5, 0x21, 0x97, 0x3d, 0xbd,
    0x9f, 0xc8, 0xaf, 0x1e, 0xa5, 0x7a, 0x84, 0x77, 0x51, 0x26, 0x07, 0x17,
    0x33, 0x77, 0x77, 0x8a, 0x6a, 0xc8, 0xff, 0x7d
};

static const UCHAR* rtos_com_match_names[] =
{
    "rtos.com",
    "threadx.com",
    "expresslogic.com",
};

static const UCHAR* rtos_com_mismatch_names[] =
{
    "www.rtos.com",
    "ttos.com",
};


static const UCHAR yahoo_com_der[] = {
    0x30, 0x82, 0x09, 0xeb, 0x30, 0x82, 0x08, 0xd3, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x10, 0x0c, 0x8a, 0xfc, 0x0d, 0xf7, 0xf2, 0xac, 0xa3, 0xbc,
    0x14, 0x5f, 0x35, 0x08, 0xc7, 0xa3, 0x13, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x70,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55,
    0x53, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x0c,
    0x44, 0x69, 0x67, 0x69, 0x43, 0x65, 0x72, 0x74, 0x20, 0x49, 0x6e, 0x63,
    0x31, 0x19, 0x30, 0x17, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x10, 0x77,
    0x77, 0x77, 0x2e, 0x64, 0x69, 0x67, 0x69, 0x63, 0x65, 0x72, 0x74, 0x2e,
    0x63, 0x6f, 0x6d, 0x31, 0x2f, 0x30, 0x2d, 0x06, 0x03, 0x55, 0x04, 0x03,
    0x13, 0x26, 0x44, 0x69, 0x67, 0x69, 0x43, 0x65, 0x72, 0x74, 0x20, 0x53,
    0x48, 0x41, 0x32, 0x20, 0x48, 0x69, 0x67, 0x68, 0x20, 0x41, 0x73, 0x73,
    0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65,
    0x72, 0x20, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x39,
    0x32, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x17, 0x0d, 0x31,
    0x38, 0x30, 0x33, 0x31, 0x39, 0x31, 0x32, 0x30, 0x30, 0x30, 0x30, 0x5a,
    0x30, 0x5e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13,
    0x02, 0x55, 0x53, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08,
    0x13, 0x02, 0x43, 0x41, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04,
    0x07, 0x13, 0x09, 0x53, 0x75, 0x6e, 0x6e, 0x79, 0x76, 0x61, 0x6c, 0x65,
    0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x0b, 0x59,
    0x61, 0x68, 0x6f, 0x6f, 0x21, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x31, 0x18,
    0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x2a, 0x2e, 0x77,
    0x77, 0x77, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d,
    0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
    0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00,
    0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0x9c, 0x55, 0xfb,
    0x6b, 0xa9, 0xd8, 0xc3, 0xe5, 0xed, 0x1d, 0x9d, 0x79, 0x0a, 0xf3, 0xb4,
    0xf4, 0xd7, 0xf4, 0x4a, 0x61, 0x51, 0xe9, 0xf5, 0xa0, 0x71, 0x59, 0x1b,
    0xc2, 0x3a, 0xbc, 0x7e, 0x0c, 0xbe, 0xfd, 0xa8, 0xe9, 0xaa, 0x3e, 0x3c,
    0x23, 0xa8, 0x80, 0x1a, 0x6f, 0x46, 0x75, 0xaf, 0x39, 0x84, 0xa3, 0x13,
    0x76, 0xa2, 0x10, 0xb6, 0x81, 0x27, 0x0b, 0xc7, 0x6a, 0xfd, 0xd9, 0x45,
    0x14, 0xc5, 0xd1, 0xf0, 0xff, 0x2b, 0xc0, 0xb0, 0xaa, 0x80, 0xf0, 0xe1,
    0x53, 0x72, 0xff, 0x71, 0xce, 0x5b, 0x31, 0x36, 0xe2, 0x5b, 0x18, 0x77,
    0x55, 0xd7, 0x51, 0xd6, 0xf8, 0x16, 0x9f, 0x93, 0x35, 0xa9, 0x85, 0x7c,
    0xc6, 0xa5, 0x4d, 0xb1, 0x16, 0x4d, 0xfe, 0x6d, 0xb6, 0xd6, 0xbb, 0x0a,
    0xf0, 0xa2, 0xbe, 0xef, 0xde, 0x9b, 0xa9, 0x1a, 0x1d, 0xb4, 0xb0, 0x50,
    0x0c, 0xa6, 0xaa, 0xd4, 0x55, 0x06, 0x17, 0x2d, 0x8b, 0x58, 0xc1, 0x64,
    0x6f, 0xe1, 0xd4, 0x38, 0x39, 0x57, 0xa5, 0x77, 0x57, 0x5e, 0xf4, 0x48,
    0xf9, 0x40, 0xa3, 0x8c, 0xf9, 0x3e, 0x97, 0x32, 0xf6, 0xb9, 0x46, 0x3f,
    0x37, 0xa4, 0x4d, 0xea, 0x77, 0x05, 0x2b, 0x71, 0x1a, 0x52, 0x6c, 0xa0,
    0xb1, 0x9f, 0x2d, 0xa1, 0x84, 0xe2, 0xa0, 0x93, 0x85, 0x7a, 0x4d, 0x35,
    0x09, 0xfb, 0xae, 0xad, 0xb2, 0x8c, 0x22, 0x09, 0x81, 0x10, 0x22, 0xcb,
    0x03, 0x1d, 0x8d, 0x7f, 0x86, 0x25, 0x7d, 0xe1, 0x4a, 0x78, 0xd9, 0x85,
    0xe2, 0x95, 0x4c, 0x3e, 0xa2, 0xa6, 0x04, 0xf3, 0xc4, 0x34, 0x72, 0x53,
    0x9f, 0x9b, 0x2b, 0xf9, 0x17, 0xba, 0xd5, 0x85, 0x7a, 0xa2, 0x76, 0xb1,
    0x01, 0x61, 0xba, 0x73, 0x41, 0x4f, 0x25, 0x13, 0xcd, 0x5a, 0x65, 0x9c,
    0x16, 0xae, 0x5a, 0x2c, 0x65, 0xde, 0x4f, 0x0b, 0x29, 0x5e, 0x9b, 0x8e,
    0xa1, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x82, 0x06, 0x91, 0x30, 0x82,
    0x06, 0x8d, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30,
    0x16, 0x80, 0x14, 0x51, 0x68, 0xff, 0x90, 0xaf, 0x02, 0x07, 0x75, 0x3c,
    0xcc, 0xd9, 0x65, 0x64, 0x62, 0xa2, 0x12, 0xb8, 0x59, 0x72, 0x3b, 0x30,
    0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x92, 0x44,
    0x77, 0x65, 0xc3, 0xdd, 0xe2, 0x63, 0x43, 0x66, 0xd6, 0x61, 0xb8, 0x68,
    0x10, 0xf3, 0x01, 0x96, 0x1c, 0x9b, 0x30, 0x82, 0x02, 0xc7, 0x06, 0x03,
    0x55, 0x1d, 0x11, 0x04, 0x82, 0x02, 0xbe, 0x30, 0x82, 0x02, 0xba, 0x82,
    0x0f, 0x2a, 0x2e, 0x77, 0x77, 0x77, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f,
    0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0d, 0x77, 0x77, 0x77, 0x2e, 0x79, 0x61,
    0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x10, 0x61, 0x64, 0x64,
    0x2e, 0x6d, 0x79, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f,
    0x6d, 0x82, 0x0c, 0x61, 0x75, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e,
    0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x62, 0x65, 0x2e, 0x79, 0x61, 0x68, 0x6f,
    0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x62, 0x72, 0x2e, 0x79, 0x61,
    0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0f, 0x63, 0x61, 0x2e,
    0x6d, 0x79, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d,
    0x82, 0x13, 0x63, 0x61, 0x2e, 0x72, 0x6f, 0x67, 0x65, 0x72, 0x73, 0x2e,
    0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x63,
    0x61, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82,
    0x10, 0x64, 0x64, 0x6c, 0x2e, 0x66, 0x70, 0x2e, 0x79, 0x61, 0x68, 0x6f,
    0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x64, 0x65, 0x2e, 0x79, 0x61,
    0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x14, 0x65, 0x6e, 0x2d,
    0x6d, 0x61, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x2e, 0x79, 0x61, 0x68, 0x6f,
    0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x11, 0x65, 0x73, 0x70, 0x61, 0x6e,
    0x6f, 0x6c, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d,
    0x82, 0x0c, 0x65, 0x73, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0f, 0x66, 0x72, 0x2d, 0x62, 0x65, 0x2e, 0x79, 0x61,
    0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x16, 0x66, 0x72, 0x2d,
    0x63, 0x61, 0x2e, 0x72, 0x6f, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x79, 0x61,
    0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x12, 0x66, 0x72, 0x6f,
    0x6e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e,
    0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x66, 0x72, 0x2e, 0x79, 0x61, 0x68, 0x6f,
    0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x67, 0x72, 0x2e, 0x79, 0x61,
    0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x68, 0x6b, 0x2e,
    0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e, 0x68,
    0x73, 0x72, 0x64, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f,
    0x6d, 0x82, 0x17, 0x69, 0x64, 0x65, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x65,
    0x74, 0x74, 0x65, 0x72, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0c, 0x69, 0x64, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f,
    0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x69, 0x65, 0x2e, 0x79, 0x61, 0x68,
    0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x69, 0x6e, 0x2e, 0x79,
    0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x69, 0x74,
    0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x11,
    0x6d, 0x61, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x2e, 0x79, 0x61, 0x68, 0x6f,
    0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x12, 0x6d, 0x61, 0x6c, 0x61, 0x79,
    0x73, 0x69, 0x61, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f,
    0x6d, 0x82, 0x0c, 0x6d, 0x79, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e,
    0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x6e, 0x7a, 0x2e, 0x79, 0x61, 0x68, 0x6f,
    0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x70, 0x68, 0x2e, 0x79, 0x61,
    0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x71, 0x63, 0x2e,
    0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x72,
    0x6f, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82,
    0x0c, 0x73, 0x65, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f,
    0x6d, 0x82, 0x0c, 0x73, 0x67, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e,
    0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x74, 0x77, 0x2e, 0x79, 0x61, 0x68, 0x6f,
    0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x75, 0x6b, 0x2e, 0x79, 0x61,
    0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x75, 0x73, 0x2e,
    0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x11, 0x76,
    0x65, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f,
    0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x76, 0x6e, 0x2e, 0x79, 0x61, 0x68,
    0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x09, 0x79, 0x61, 0x68, 0x6f,
    0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x7a, 0x61, 0x2e, 0x79, 0x61,
    0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x2e, 0x61,
    0x6d, 0x70, 0x2e, 0x79, 0x69, 0x6d, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x82,
    0x0c, 0x6d, 0x62, 0x70, 0x2e, 0x79, 0x69, 0x6d, 0x67, 0x2e, 0x63, 0x6f,
    0x6d, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04,
    0x04, 0x03, 0x02, 0x05, 0xa0, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x25,
    0x04, 0x16, 0x30, 0x14, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07,
    0x03, 0x01, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x02,
    0x30, 0x75, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x6e, 0x30, 0x6c, 0x30,
    0x34, 0xa0, 0x32, 0xa0, 0x30, 0x86, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x3a,
    0x2f, 0x2f, 0x63, 0x72, 0x6c, 0x33, 0x2e, 0x64, 0x69, 0x67, 0x69, 0x63,
    0x65, 0x72, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x68, 0x61, 0x32,
    0x2d, 0x68, 0x61, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2d, 0x67,
    0x31, 0x2e, 0x63, 0x72, 0x6c, 0x30, 0x34, 0xa0, 0x32, 0xa0, 0x30, 0x86,
    0x2e, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x6c, 0x34,
    0x2e, 0x64, 0x69, 0x67, 0x69, 0x63, 0x65, 0x72, 0x74, 0x2e, 0x63, 0x6f,
    0x6d, 0x2f, 0x73, 0x68, 0x61, 0x32, 0x2d, 0x68, 0x61, 0x2d, 0x73, 0x65,
    0x72, 0x76, 0x65, 0x72, 0x2d, 0x67, 0x31, 0x2e, 0x63, 0x72, 0x6c, 0x30,
    0x4c, 0x06, 0x03, 0x55, 0x1d, 0x20, 0x04, 0x45, 0x30, 0x43, 0x30, 0x37,
    0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x86, 0xfd, 0x6c, 0x01, 0x01, 0x30,
    0x2a, 0x30, 0x28, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x02,
    0x01, 0x16, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77,
    0x77, 0x77, 0x2e, 0x64, 0x69, 0x67, 0x69, 0x63, 0x65, 0x72, 0x74, 0x2e,
    0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x50, 0x53, 0x30, 0x08, 0x06, 0x06, 0x67,
    0x81, 0x0c, 0x01, 0x02, 0x02, 0x30, 0x81, 0x83, 0x06, 0x08, 0x2b, 0x06,
    0x01, 0x05, 0x05, 0x07, 0x01, 0x01, 0x04, 0x77, 0x30, 0x75, 0x30, 0x24,
    0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x86, 0x18,
    0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6f, 0x63, 0x73, 0x70, 0x2e,
    0x64, 0x69, 0x67, 0x69, 0x63, 0x65, 0x72, 0x74, 0x2e, 0x63, 0x6f, 0x6d,
    0x30, 0x4d, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x02,
    0x86, 0x41, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x61, 0x63,
    0x65, 0x72, 0x74, 0x73, 0x2e, 0x64, 0x69, 0x67, 0x69, 0x63, 0x65, 0x72,
    0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x69, 0x67, 0x69, 0x43, 0x65,
    0x72, 0x74, 0x53, 0x48, 0x41, 0x32, 0x48, 0x69, 0x67, 0x68, 0x41, 0x73,
    0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65,
    0x72, 0x43, 0x41, 0x2e, 0x63, 0x72, 0x74, 0x30, 0x0c, 0x06, 0x03, 0x55,
    0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x82, 0x01,
    0xf6, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xd6, 0x79, 0x02, 0x04,
    0x02, 0x04, 0x82, 0x01, 0xe6, 0x04, 0x82, 0x01, 0xe2, 0x01, 0xe0, 0x00,
    0x76, 0x00, 0xa4, 0xb9, 0x09, 0x90, 0xb4, 0x18, 0x58, 0x14, 0x87, 0xbb,
    0x13, 0xa2, 0xcc, 0x67, 0x70, 0x0a, 0x3c, 0x35, 0x98, 0x04, 0xf9, 0x1b,
    0xdf, 0xb8, 0xe3, 0x77, 0xcd, 0x0e, 0xc8, 0x0d, 0xdc, 0x10, 0x00, 0x00,
    0x01, 0x5e, 0xa1, 0x7b, 0xe4, 0xff, 0x00, 0x00, 0x04, 0x03, 0x00, 0x47,
    0x30, 0x45, 0x02, 0x21, 0x00, 0xe9, 0xf3, 0xca, 0x5d, 0xe1, 0x30, 0xeb,
    0x56, 0x28, 0x4e, 0x03, 0xf5, 0x0a, 0xea, 0x81, 0x6d, 0x0e, 0xe5, 0x1c,
    0xc3, 0x07, 0xb8, 0x99, 0xf5, 0xa1, 0x4d, 0xfa, 0xe5, 0x8f, 0x75, 0x88,
    0x8c, 0x02, 0x20, 0x35, 0x60, 0x01, 0x70, 0x36, 0x55, 0x65, 0x14, 0x2f,
    0x9a, 0xac, 0xd4, 0xb4, 0xca, 0x72, 0x27, 0x60, 0x32, 0xe5, 0x71, 0xce,
    0x06, 0x9e, 0x93, 0xa6, 0x1c, 0xf7, 0xe4, 0xba, 0x32, 0x6b, 0x0f, 0x00,
    0x76, 0x00, 0x56, 0x14, 0x06, 0x9a, 0x2f, 0xd7, 0xc2, 0xec, 0xd3, 0xf5,
    0xe1, 0xbd, 0x44, 0xb2, 0x3e, 0xc7, 0x46, 0x76, 0xb9, 0xbc, 0x99, 0x11,
    0x5c, 0xc0, 0xef, 0x94, 0x98, 0x55, 0xd6, 0x89, 0xd0, 0xdd, 0x00, 0x00,
    0x01, 0x5e, 0xa1, 0x7b, 0xe5, 0xca, 0x00, 0x00, 0x04, 0x03, 0x00, 0x47,
    0x30, 0x45, 0x02, 0x20, 0x75, 0xd8, 0xe8, 0xc0, 0xd1, 0x54, 0x97, 0xa5,
    0x7d, 0xa8, 0x3a, 0xf1, 0xa1, 0x96, 0xcd, 0x0f, 0x02, 0x66, 0x52, 0x35,
    0x67, 0xc0, 0x70, 0xa8, 0xee, 0x39, 0xf1, 0xc9, 0xfd, 0xfa, 0xbe, 0x78,
    0x02, 0x21, 0x00, 0xa8, 0x60, 0x18, 0x82, 0x03, 0x21, 0xcd, 0x90, 0x15,
    0xe9, 0x3d, 0xeb, 0xe0, 0xaa, 0x5f, 0x6e, 0x62, 0x2b, 0x85, 0x7b, 0xe6,
    0x46, 0xbb, 0x5a, 0xe7, 0x9c, 0xd0, 0x47, 0x9b, 0xae, 0xaa, 0xa5, 0x00,
    0x76, 0x00, 0xee, 0x4b, 0xbd, 0xb7, 0x75, 0xce, 0x60, 0xba, 0xe1, 0x42,
    0x69, 0x1f, 0xab, 0xe1, 0x9e, 0x66, 0xa3, 0x0f, 0x7e, 0x5f, 0xb0, 0x72,
    0xd8, 0x83, 0x00, 0xc4, 0x7b, 0x89, 0x7a, 0xa8, 0xfd, 0xcb, 0x00, 0x00,
    0x01, 0x5e, 0xa1, 0x7b, 0xe8, 0x02, 0x00, 0x00, 0x04, 0x03, 0x00, 0x47,
    0x30, 0x45, 0x02, 0x20, 0x30, 0x6b, 0x15, 0x06, 0x38, 0x6c, 0x92, 0xbb,
    0x54, 0xa9, 0xeb, 0x9c, 0x64, 0x0d, 0x83, 0x5a, 0x55, 0xc3, 0x27, 0x25,
    0x0b, 0x8d, 0x30, 0xae, 0x0c, 0x63, 0x9b, 0x6f, 0x3d, 0x9b, 0x84, 0xda,
    0x02, 0x21, 0x00, 0x95, 0xdc, 0xf0, 0x2f, 0x86, 0xe6, 0xde, 0x2d, 0x93,
    0x46, 0xb4, 0x60, 0xe1, 0x59, 0x6e, 0x55, 0x88, 0x7c, 0xf6, 0x27, 0x06,
    0x01, 0x73, 0x86, 0xe1, 0x06, 0x3d, 0x9a, 0xed, 0x2e, 0xe9, 0xc2, 0x00,
    0x76, 0x00, 0xbb, 0xd9, 0xdf, 0xbc, 0x1f, 0x8a, 0x71, 0xb5, 0x93, 0x94,
    0x23, 0x97, 0xaa, 0x92, 0x7b, 0x47, 0x38, 0x57, 0x95, 0x0a, 0xab, 0x52,
    0xe8, 0x1a, 0x90, 0x96, 0x64, 0x36, 0x8e, 0x1e, 0xd1, 0x85, 0x00, 0x00,
    0x01, 0x5e, 0xa1, 0x7b, 0xe5, 0xb7, 0x00, 0x00, 0x04, 0x03, 0x00, 0x47,
    0x30, 0x45, 0x02, 0x20, 0x15, 0x89, 0x02, 0x7d, 0x9c, 0x17, 0x08, 0xd6,
    0x97, 0x18, 0xd7, 0x59, 0x3e, 0x8b, 0xce, 0xb3, 0x71, 0x4b, 0x50, 0xaa,
    0x9f, 0x4c, 0x71, 0x36, 0x96, 0x50, 0x03, 0xa1, 0xdb, 0x58, 0xe5, 0x0d,
    0x02, 0x21, 0x00, 0xf8, 0x6a, 0x0e, 0x67, 0x9a, 0xf8, 0x27, 0xc0, 0xe9,
    0xe1, 0xe3, 0xb5, 0x0f, 0xdd, 0x5d, 0x8c, 0xfb, 0x56, 0x5b, 0xbb, 0x32,
    0x5c, 0x51, 0x37, 0x44, 0xff, 0xfc, 0xaa, 0x03, 0x5d, 0xc9, 0xee, 0x30,
    0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b,
    0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x8d, 0x8f, 0x31, 0x82, 0xd3,
    0x86, 0xb4, 0xef, 0x16, 0xd7, 0x6b, 0x4a, 0x84, 0x0c, 0xc7, 0xf9, 0xde,
    0x98, 0xbf, 0x2c, 0x95, 0x7e, 0xb7, 0x29, 0xa6, 0xf4, 0x7f, 0xf2, 0xb1,
    0x6a, 0x1a, 0x25, 0x77, 0xaa, 0xcb, 0x41, 0xe1, 0xd7, 0x51, 0x68, 0xcd,
    0x19, 0x9c, 0xd1, 0x22, 0x56, 0x03, 0x6e, 0x0b, 0x46, 0xd7, 0xcc, 0x01,
    0x1f, 0x84, 0xff, 0x73, 0x11, 0x78, 0x1e, 0x30, 0xb7, 0xc3, 0x49, 0x8f,
    0x47, 0x71, 0x04, 0x2e, 0xf4, 0x35, 0xf3, 0xd9, 0xd2, 0x59, 0x5a, 0x28,
    0x1c, 0x9e, 0xfb, 0xe9, 0xc2, 0xdf, 0xa7, 0x9b, 0x9f, 0xa0, 0x98, 0xc2,
    0xe7, 0xf2, 0x7b, 0x09, 0x4d, 0x36, 0x67, 0x9c, 0x63, 0x66, 0xe5, 0x77,
    0x0b, 0x21, 0x60, 0x34, 0xd2, 0x74, 0x84, 0x62, 0xad, 0xa4, 0x05, 0x87,
    0x55, 0x87, 0xe7, 0x49, 0x85, 0xc4, 0x4b, 0x8e, 0x34, 0x30, 0x34, 0xe3,
    0x42, 0x67, 0xa5, 0xaf, 0x1b, 0x3c, 0x27, 0xd9, 0xf1, 0x1f, 0x38, 0x89,
    0x62, 0x33, 0xe8, 0x9e, 0x1f, 0x51, 0x83, 0x87, 0x19, 0xc5, 0x35, 0x96,
    0x8d, 0xba, 0xff, 0x34, 0x21, 0x46, 0xec, 0xf2, 0xb3, 0x35, 0xf9, 0x5c,
    0x8b, 0xf0, 0x8b, 0xdc, 0xf9, 0x6b, 0xab, 0x5d, 0x5a, 0x26, 0x7b, 0xd5,
    0x66, 0xe3, 0x51, 0xe7, 0xc7, 0x6f, 0xc6, 0x0f, 0x7b, 0x2f, 0x00, 0x2f,
    0x2b, 0xcc, 0x5b, 0xf7, 0x8a, 0x55, 0x9d, 0xee, 0x31, 0x37, 0x59, 0x85,
    0xe3, 0x24, 0x6d, 0x19, 0x3e, 0xfc, 0x26, 0x85, 0x30, 0xa5, 0x7d, 0x8c,
    0xf8, 0xc8, 0xc1, 0x8c, 0x02, 0x66, 0x72, 0xd4, 0xa0, 0x99, 0x5e, 0x30,
    0x62, 0x09, 0x23, 0xbb, 0xab, 0xcd, 0x40, 0x3f, 0xc8, 0xb0, 0x9c, 0xa1,
    0xd9, 0x9b, 0x6d, 0x99, 0xe5, 0xcf, 0x86, 0xff, 0xa2, 0x9d, 0x9c, 0x60,
    0x60, 0x78, 0x31, 0xf4, 0x7e, 0x03, 0x81, 0xc7, 0xf5, 0x8b, 0xb1
};

static const UCHAR* yahoo_com_match_names[] =
{
    "test.www.yahoo.com",
    "www.yahoo.com",
    "add.my.yahoo.com",
    "www.amp.yimg.com",
    "mbp.yimg.com",
};

static const UCHAR* yahoo_com_mismatch_names[] =
{
    "zzz.yahoo.com",
    "a.b.www.yahoo.com",
    "amp.yimg.com"
};


static const UCHAR example_com_der[] = {
    0x30, 0x82, 0x03, 0x25, 0x30, 0x82, 0x02, 0x0d, 0x02, 0x09, 0x00, 0xe8,
    0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x54, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x52,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43,
    0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02,
    0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a,
    0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55,
    0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x30, 0x1e,
    0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30, 0x39, 0x30, 0x37, 0x33, 0x37,
    0x35, 0x36, 0x5a, 0x17, 0x0d, 0x32, 0x30, 0x30, 0x38, 0x32, 0x39, 0x30,
    0x37, 0x33, 0x37, 0x35, 0x36, 0x5a, 0x30, 0x57, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0b,
    0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30,
    0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
    0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30,
    0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xb5, 0xb8, 0x43, 0xe0,
    0x33, 0x31, 0x80, 0x31, 0xe6, 0x0d, 0x65, 0x84, 0x40, 0x34, 0xe1, 0xfb,
    0x69, 0xa6, 0x23, 0xbd, 0x35, 0xcd, 0xde, 0xbc, 0x0f, 0x1a, 0xd4, 0x27,
    0x44, 0xee, 0x03, 0xdf, 0xc5, 0xcc, 0x2c, 0x22, 0xda, 0xe1, 0x67, 0x3b,
    0x6b, 0xa1, 0xa9, 0x97, 0x93, 0xa1, 0x58, 0x1c, 0x23, 0x1b, 0x2c, 0xf0,
    0xd0, 0xee, 0x3f, 0x32, 0xbf, 0x23, 0x23, 0xf9, 0x22, 0x56, 0xa2, 0x1e,
    0x31, 0xfd, 0x22, 0x02, 0x9a, 0x12, 0x83, 0x2c, 0x34, 0xf4, 0x32, 0xf2,
    0xb4, 0x5f, 0x13, 0x77, 0x71, 0x49, 0x8f, 0xcb, 0x52, 0xb4, 0xf5, 0xd6,
    0xb2, 0xd5, 0xd6, 0x05, 0x92, 0x3d, 0x53, 0x85, 0x7d, 0x36, 0x5e, 0x4d,
    0xd4, 0x5d, 0xc0, 0xcd, 0x6d, 0xd8, 0xf3, 0xc8, 0x72, 0xa2, 0x4a, 0xf9,
    0x8b, 0x1a, 0x12, 0xa4, 0x89, 0xc2, 0xcd, 0x86, 0xf9, 0x50, 0x6c, 0xc6,
    0x37, 0x36, 0x3e, 0xeb, 0xb4, 0xb5, 0x7c, 0xda, 0x14, 0xf8, 0x05, 0x51,
    0x5c, 0x90, 0x13, 0xc2, 0xa8, 0x82, 0xac, 0x13, 0x8b, 0x29, 0x66, 0x4c,
    0x51, 0xde, 0xf4, 0x6f, 0xfc, 0x49, 0x95, 0x68, 0x36, 0xbc, 0x69, 0xe4,
    0xe0, 0xb9, 0xb7, 0x49, 0xcb, 0x99, 0x8c, 0x51, 0xc1, 0x82, 0x4b, 0x94,
    0xed, 0x83, 0x6e, 0xc8, 0xc6, 0x4c, 0x43, 0x47, 0x6d, 0x4f, 0xce, 0x10,
    0x54, 0x06, 0xd7, 0xa9, 0x2b, 0x29, 0x77, 0x53, 0xd3, 0xfb, 0xd3, 0x32,
    0xb9, 0x6d, 0x73, 0x22, 0x0d, 0xa8, 0xcd, 0x1a, 0xf9, 0x8e, 0x51, 0xeb,
    0x12, 0x37, 0xee, 0xc4, 0xe4, 0x21, 0xf6, 0x6a, 0x4e, 0x14, 0x9c, 0xcc,
    0xad, 0x02, 0xbe, 0x21, 0x99, 0x7d, 0x56, 0xd5, 0xb0, 0x13, 0x0e, 0x3c,
    0x0d, 0x6e, 0x8e, 0xb8, 0x3c, 0xb8, 0x5c, 0xff, 0x64, 0xe2, 0xf6, 0xd6,
    0xa7, 0x06, 0x03, 0x77, 0x0d, 0xe4, 0x5e, 0xe4, 0x50, 0x26, 0x28, 0x7f,
    0x02, 0x03, 0x01, 0x00, 0x01, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48,
    0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01, 0x01,
    0x00, 0x8d, 0xb7, 0xf9, 0x4f, 0xe3, 0x9b, 0x25, 0xdd, 0x49, 0x69, 0x37,
    0xae, 0xca, 0xd6, 0x18, 0x4a, 0x96, 0x63, 0x83, 0x9d, 0x3d, 0xec, 0xeb,
    0x62, 0x97, 0xeb, 0xfc, 0x91, 0x5f, 0xf4, 0x2b, 0x62, 0x39, 0x11, 0xd4,
    0xb7, 0x31, 0x75, 0x1b, 0x08, 0xda, 0x4e, 0xa4, 0xf8, 0x2c, 0x08, 0x61,
    0x80, 0x3e, 0x1d, 0x18, 0x72, 0x71, 0x9b, 0x78, 0xea, 0x12, 0x79, 0xa6,
    0x70, 0xc1, 0x40, 0x06, 0x26, 0xee, 0xaf, 0x26, 0xd7, 0xa2, 0x79, 0x32,
    0xfa, 0x4f, 0xcc, 0x9a, 0x1d, 0xb9, 0xdf, 0x57, 0x3c, 0x0f, 0x2c, 0x12,
    0x7b, 0xa7, 0x5f, 0xd3, 0x38, 0x40, 0x33, 0x8c, 0xfa, 0x16, 0x8f, 0x10,
    0xf0, 0xe3, 0x81, 0x35, 0x0d, 0x2e, 0x38, 0xd8, 0x82, 0x23, 0xa7, 0xdb,
    0x9e, 0x7c, 0x78, 0xb9, 0x6b, 0x52, 0xcc, 0x0d, 0x40, 0x22, 0xbf, 0x5d,
    0x15, 0x97, 0xcf, 0x8f, 0xf3, 0x38, 0x73, 0x25, 0x85, 0x5f, 0x07, 0xbd,
    0x11, 0x81, 0x03, 0x1f, 0xc0, 0x82, 0xe4, 0xcb, 0xaa, 0xe2, 0x3a, 0xa8,
    0x6b, 0x92, 0x41, 0xaa, 0xa1, 0xb6, 0xe1, 0x23, 0x44, 0xca, 0xcc, 0xa2,
    0x43, 0x5a, 0xc1, 0xae, 0x62, 0x32, 0x8d, 0x85, 0x64, 0xc3, 0x0c, 0x0c,
    0x38, 0x97, 0x47, 0x08, 0xbb, 0x25, 0x78, 0xc3, 0x8f, 0x38, 0xfe, 0x73,
    0x26, 0xf9, 0xec, 0x72, 0x5c, 0x14, 0xe3, 0xd7, 0x55, 0x5b, 0x6c, 0xf5,
    0x16, 0xb2, 0x15, 0xe7, 0x35, 0x54, 0x45, 0xbb, 0x8a, 0x75, 0xeb, 0x84,
    0xd5, 0xb7, 0xdd, 0xab, 0x65, 0xe9, 0x82, 0x6f, 0x4e, 0xd7, 0x11, 0x99,
    0x09, 0x83, 0x4c, 0x40, 0xd8, 0xde, 0x8e, 0x6f, 0xfe, 0xd2, 0x78, 0x70,
    0x17, 0x9d, 0x41, 0x0d, 0x50, 0xa2, 0x6a, 0xe4, 0xcc, 0xb3, 0xf9, 0x34,
    0x4a, 0x7f, 0x43, 0x2a, 0x48, 0x79, 0x74, 0xbc, 0xe9, 0x3d, 0x48, 0x37,
    0x76, 0xed, 0xd9, 0x7b, 0x80
};

static const UCHAR* example_com_match_names[] =
{
    "example.com",
};

static const UCHAR* example_com_mismatch_names[] =
{
    "www.example.com",
};

static const UCHAR domain_com_der[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0x30, 0x6c, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0x04, 0x40, 0x30, 0x3e, 0x82, 0x0e, 0x77, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};

static const UCHAR* domain_com_match_names[] =
{
    "domain.com",
    "www.domain.com",
    "aaa.domain.com",
};

static const UCHAR* domain_com_mismatch_names[] =
{
    "a.b.domain.com",
    "ab.example.com",
};

static X509_NAME_TEST_DATA name_check_test_data[] =
{
    { rtos_com_der, sizeof(rtos_com_der), rtos_com_match_names, sizeof(rtos_com_match_names) / sizeof(UCHAR*), rtos_com_mismatch_names, sizeof(rtos_com_mismatch_names) / sizeof(UCHAR*) },
    { yahoo_com_der, sizeof(yahoo_com_der), yahoo_com_match_names, sizeof(yahoo_com_match_names) / sizeof(UCHAR*), yahoo_com_mismatch_names, sizeof(yahoo_com_mismatch_names) / sizeof(UCHAR*) },
    { example_com_der, sizeof(example_com_der), example_com_match_names, sizeof(example_com_match_names) / sizeof(UCHAR*), example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },
    { domain_com_der, sizeof(domain_com_der), domain_com_match_names, sizeof(domain_com_match_names) / sizeof(UCHAR*), domain_com_mismatch_names, sizeof(domain_com_mismatch_names) / sizeof(UCHAR*) },

};

static const UCHAR bad_ext_seq_tag[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0xf0, 0x6c, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0x04, 0x40, 0x30, 0x3e, 0x82, 0x0e, 0x77, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};

static const UCHAR bad_ext_seq_length[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0x30, 0x82, 0xf6, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0x04, 0x40, 0x30, 0x3e, 0x82, 0x0e, 0x77, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};

static const UCHAR bad_ext_seq_type[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0x31, 0x6c, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0x04, 0x40, 0x30, 0x3e, 0x82, 0x0e, 0x77, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};

static const UCHAR bad_ext_oid_tag[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0x30, 0x6c, 0xf6, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0x04, 0x40, 0x30, 0x3e, 0x82, 0x0e, 0x77, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};

static const UCHAR bad_ext_oid_type[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0x30, 0x6c, 0x07, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0x04, 0x40, 0x30, 0x3e, 0x82, 0x0e, 0x77, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};

static const UCHAR bad_ext_critical_tag[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0x30, 0x6c, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0xf4, 0x40, 0x30, 0x3e, 0x82, 0x0e, 0x77, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};

static const UCHAR bad_ext_octstr_tag[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0x30, 0x6c, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0x01, 0x01, 0xff, 0xfe, 0x82, 0x0e, 0x77, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};

static const UCHAR bad_ext_octstr_type[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0x30, 0x6c, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0x06, 0x40, 0x30, 0x3e, 0x82, 0x0e, 0x77, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};

static const UCHAR bad_alt_name_seq_tag[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0x30, 0x6c, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0x04, 0x40, 0xf0, 0x3e, 0x82, 0x0e, 0x77, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};

static const UCHAR bad_alt_name_seq_length[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0x30, 0x6c, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0x04, 0x40, 0x30, 0x82, 0xf2, 0x0e, 0x77, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};

static const UCHAR bad_alt_name_seq_type[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0x30, 0x6c, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0x04, 0x40, 0x31, 0x3e, 0x82, 0x0e, 0x77, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};

static const UCHAR bad_alt_name_tag[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0x30, 0x6c, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0x04, 0x40, 0x30, 0x3e, 0xf2, 0x0e, 0x77, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};

static const UCHAR bad_alt_name_length[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0x30, 0x6c, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0x04, 0x40, 0x30, 0x3e, 0x82, 0x82, 0xf7, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};

static const UCHAR bad_alt_name_type[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0x30, 0x6c, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0x04, 0x40, 0x30, 0x3e, 0x02, 0x0e, 0x77, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};

static const UCHAR bad_alt_name_type2[] = {
    0x30, 0x82, 0x03, 0xfe, 0x30, 0x82, 0x02, 0xe6, 0xa0, 0x03, 0x02, 0x01,
    0x02, 0x02, 0x09, 0x00, 0xe8, 0xc2, 0xa4, 0x9c, 0x7c, 0x44, 0xb8, 0x59,
    0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
    0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
    0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f,
    0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06, 0x54, 0x65, 0x73,
    0x74, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x31, 0x30,
    0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x17, 0x0d, 0x32, 0x30,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x39, 0x30, 0x35, 0x34, 0x32, 0x5a, 0x30,
    0x56, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
    0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c,
    0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07,
    0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
    0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
    0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
    0x55, 0x04, 0x03, 0x0c, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
    0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
    0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
    0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
    0xca, 0xda, 0xad, 0xb7, 0xf0, 0x38, 0xb4, 0xab, 0x57, 0x90, 0x7f, 0x17,
    0xc9, 0x27, 0x19, 0x3f, 0x38, 0x8b, 0xc4, 0x33, 0x48, 0x4e, 0x79, 0xe6,
    0x86, 0x0e, 0x9d, 0x80, 0xa1, 0xd1, 0x59, 0xf5, 0xcb, 0x00, 0x4b, 0x7a,
    0xb4, 0x2d, 0xdf, 0x1d, 0xc5, 0x88, 0x4f, 0x82, 0xf7, 0x5f, 0x88, 0x96,
    0xc0, 0xb7, 0xc6, 0x8e, 0x7b, 0x58, 0x89, 0xa8, 0xe5, 0x2d, 0xf6, 0x00,
    0xf5, 0xb7, 0x2d, 0x7e, 0x65, 0x0a, 0x93, 0x8b, 0x75, 0x4f, 0x2d, 0xec,
    0xb3, 0xc3, 0x42, 0xc5, 0x12, 0x0d, 0xb4, 0x5b, 0xe2, 0xd6, 0x37, 0x11,
    0x24, 0x1b, 0x80, 0x80, 0xe7, 0xf7, 0x5c, 0xb0, 0x32, 0x7c, 0xd0, 0x39,
    0x6a, 0x28, 0x79, 0x17, 0x60, 0xf0, 0x50, 0x7f, 0x8d, 0xaf, 0x8d, 0x13,
    0x11, 0xf4, 0x61, 0x1b, 0xb6, 0x49, 0x53, 0x17, 0x06, 0x76, 0x8a, 0xb3,
    0xe5, 0x38, 0xf0, 0xe8, 0x33, 0x25, 0x18, 0x7c, 0xf3, 0x03, 0x6c, 0x4b,
    0x48, 0x63, 0x2e, 0xe7, 0xa5, 0xe1, 0x39, 0x10, 0xcd, 0xc9, 0xdf, 0x4a,
    0x9e, 0x29, 0xcb, 0x4e, 0x75, 0x02, 0x0f, 0x28, 0xb1, 0x57, 0xf6, 0xd5,
    0x6f, 0x64, 0x23, 0xd5, 0xcb, 0xfd, 0x9d, 0x11, 0x96, 0xb4, 0x34, 0x99,
    0xe2, 0xaf, 0x8f, 0xe2, 0xd6, 0x31, 0xf2, 0x8a, 0x3a, 0x32, 0x6a, 0x91,
    0x8c, 0x3f, 0xdf, 0x49, 0xd9, 0xd0, 0x89, 0x76, 0x96, 0x1b, 0xfe, 0xee,
    0x50, 0x0d, 0xc3, 0x40, 0xad, 0x00, 0x24, 0xbc, 0x62, 0x3d, 0xb2, 0xe4,
    0x68, 0xe0, 0xbf, 0xf3, 0x02, 0xe5, 0xd4, 0x1b, 0xa8, 0xa9, 0x1c, 0xc8,
    0xbd, 0xe7, 0x4c, 0xd2, 0x3b, 0x46, 0xfe, 0x3d, 0x0c, 0x80, 0x82, 0x0f,
    0xc3, 0xea, 0x60, 0x7e, 0x23, 0x97, 0xd9, 0x97, 0x0c, 0xb0, 0x87, 0x05,
    0x3f, 0x36, 0x8b, 0x76, 0x28, 0x3d, 0x2e, 0xa8, 0x20, 0xdd, 0x5c, 0x7d,
    0xb3, 0x25, 0xc2, 0xb7, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xd2,
    0x30, 0x81, 0xcf, 0x30, 0x6c, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x65,
    0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
    0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
    0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
    0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
    0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
    0x54, 0x65, 0x73, 0x74, 0x43, 0x41, 0x82, 0x09, 0x00, 0xc0, 0xbe, 0x29,
    0xae, 0x89, 0x1b, 0xc9, 0xe5, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13,
    0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04,
    0x04, 0x03, 0x02, 0x04, 0xf0, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x11,
    0x04, 0x40, 0x30, 0x3e, 0x83, 0x0e, 0x77, 0x77, 0x77, 0x2e, 0x64, 0x6f,
    0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0c, 0x2a, 0x2e,
    0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x82, 0x0e,
    0x61, 0x2a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
    0x6f, 0x6d, 0x82, 0x0e, 0x2a, 0x62, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
    0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
    0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x01, 0x00, 0x7e, 0xfe, 0x0c, 0x03, 0x19, 0x7d, 0xfe, 0x4b, 0x6c, 0xa8,
    0xe6, 0x84, 0x68, 0xa5, 0x7f, 0x53, 0x82, 0x64, 0xf0, 0x8d, 0x23, 0xf3,
    0x0e, 0x53, 0x15, 0x79, 0x8f, 0xb9, 0x95, 0xa3, 0x31, 0xe4, 0x85, 0x73,
    0xfa, 0xf9, 0x74, 0x75, 0xd8, 0x76, 0x39, 0xa8, 0x82, 0x49, 0x8a, 0x8e,
    0xeb, 0x20, 0xfe, 0x2a, 0x46, 0xe8, 0xe1, 0x5b, 0xc3, 0x27, 0x17, 0xea,
    0x9d, 0x09, 0xe7, 0x7b, 0xde, 0x8e, 0x98, 0x18, 0x19, 0x6a, 0xaf, 0xe8,
    0x6e, 0xac, 0x56, 0x5a, 0xdd, 0x6b, 0x36, 0xc7, 0xc5, 0xc1, 0xca, 0x75,
    0x92, 0xc0, 0x47, 0x07, 0x1d, 0xea, 0x4c, 0x50, 0x24, 0x46, 0x35, 0x5e,
    0xc6, 0x6b, 0x46, 0x01, 0x0d, 0x7b, 0xf2, 0xb9, 0x89, 0x4c, 0x10, 0xef,
    0xee, 0xe8, 0xd6, 0xb1, 0x70, 0x10, 0x82, 0x57, 0xf2, 0xc8, 0xc0, 0xe9,
    0xbd, 0xac, 0xec, 0x8e, 0x0f, 0x9a, 0xd6, 0xaf, 0x9c, 0x45, 0x30, 0x0b,
    0x43, 0x6a, 0x0c, 0x14, 0x7f, 0x70, 0x62, 0xaa, 0x19, 0x3a, 0x9d, 0x25,
    0x87, 0xec, 0x39, 0xc4, 0x0f, 0xca, 0xbf, 0x7d, 0xe6, 0x23, 0x24, 0x41,
    0x04, 0xc8, 0xb2, 0x0e, 0x45, 0x6d, 0xe6, 0xf4, 0x00, 0x86, 0x12, 0xde,
    0x49, 0x01, 0x2b, 0xcf, 0x75, 0x3e, 0x9b, 0x51, 0x63, 0xe4, 0xe7, 0x1e,
    0x55, 0x6a, 0x84, 0x07, 0x50, 0xcb, 0xc9, 0x26, 0x90, 0xf1, 0x11, 0xab,
    0x10, 0xad, 0x13, 0xef, 0x83, 0x72, 0x85, 0x78, 0xfa, 0x93, 0x55, 0x39,
    0x7e, 0x17, 0xe1, 0x01, 0x71, 0xbc, 0xcf, 0x77, 0x1c, 0x7f, 0x13, 0x71,
    0x99, 0x20, 0x52, 0xf6, 0x57, 0x2b, 0x38, 0x30, 0x4a, 0x37, 0xf9, 0x74,
    0x7f, 0x94, 0xff, 0x2b, 0x55, 0x6d, 0x66, 0x91, 0x91, 0x23, 0xbb, 0x8d,
    0xa7, 0x0d, 0x5c, 0x87, 0x26, 0x44, 0x8b, 0x23, 0x1a, 0xd7, 0x3c, 0x0a,
    0x71, 0xb5, 0x0e, 0xe6, 0x1b, 0x66
};


static X509_NAME_TEST_DATA name_check_bad_cert_test_data[] =
{
    { bad_ext_seq_tag, sizeof(bad_ext_seq_tag), 0, 0, example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },
    { bad_ext_seq_length, sizeof(bad_ext_seq_length), 0, 0, example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },
    { bad_ext_seq_type, sizeof(bad_ext_seq_type), 0, 0, example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },
    { bad_ext_oid_tag, sizeof(bad_ext_oid_tag), 0, 0, example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },
    { bad_ext_oid_type, sizeof(bad_ext_oid_type), 0, 0, example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },
    { bad_ext_critical_tag, sizeof(bad_ext_critical_tag), 0, 0, example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },
    { bad_ext_octstr_tag, sizeof(bad_ext_octstr_tag), 0, 0, example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },
    { bad_ext_octstr_type, sizeof(bad_ext_octstr_type), 0, 0, example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },
    { bad_alt_name_seq_tag, sizeof(bad_alt_name_seq_tag), 0, 0, example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },
    { bad_alt_name_seq_length, sizeof(bad_alt_name_seq_length), 0, 0, example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },
    { bad_alt_name_seq_type, sizeof(bad_alt_name_seq_type), 0, 0, example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },
    { bad_alt_name_tag, sizeof(bad_alt_name_tag), 0, 0, example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },
    { bad_alt_name_length, sizeof(bad_alt_name_length), 0, 0, example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },
    { bad_alt_name_type, sizeof(bad_alt_name_type), 0, 0, example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },
    { bad_alt_name_type2, sizeof(bad_alt_name_type2), 0, 0, example_com_mismatch_names, sizeof(example_com_mismatch_names) / sizeof(UCHAR*) },

};

static TX_THREAD thread_0;

static VOID thread_0_entry(ULONG thread_input);

#ifdef CTEST
void test_application_define(void *first_unused_memory);
void test_application_define(void *first_unused_memory)
#else
void nx_secure_x509_name_check_test_application_define(void *first_unused_memory)
#endif
{
    tx_thread_create(&thread_0, "Thread 0", thread_0_entry, 0,
        first_unused_memory, 4096,
        16, 16, 4, TX_AUTO_START);
}

static VOID thread_0_entry(ULONG thread_input)
{
UINT i;
UINT j;
UINT status;
NX_SECURE_X509_CERT certificate;
NX_SECURE_X509_DNS_NAME dns_name;

    /* Print out test information banner.  */
    printf("NetX Secure Test:   X509 Common name check test........................");

    /* Error checkings. */
    status = nx_secure_x509_dns_name_initialize(NX_NULL, NX_NULL, 0);
    EXPECT_EQ(NX_PTR_ERROR, status);
    status = nx_secure_x509_dns_name_initialize(&dns_name, NX_NULL, NX_SECURE_X509_NAME_STRING_TOO_LONG + 1);
    EXPECT_EQ(NX_SECURE_X509_NAME_STRING_TOO_LONG, status);

    for (i = 0; i < sizeof(name_check_test_data) / sizeof(X509_NAME_TEST_DATA); i++)
    {
        memset(&certificate, 0, sizeof(certificate));

        /* Initialize our certificate structure. */
        status = nx_secure_x509_certificate_initialize(&certificate, (UCHAR*)name_check_test_data[i].cert_data, name_check_test_data[i].cert_data_length, NX_NULL, 0, NX_NULL, 0, NX_SECURE_X509_KEY_TYPE_NONE);
        EXPECT_EQ(NX_SUCCESS, status);

        /* Test common name dns check with match names. */
        for (j = 0; j < name_check_test_data[i].match_names_count; j++)
        {
            status = _nx_secure_x509_common_name_dns_check(&certificate, name_check_test_data[i].match_names[j], strlen(name_check_test_data[i].match_names[j]));
            EXPECT_EQ(NX_SUCCESS, status);
        }

        /* Test common name dns check with mismatch names. */
        for (j = 0; j < name_check_test_data[i].mismatch_names_count; j++)
        {
            status = _nx_secure_x509_common_name_dns_check(&certificate, name_check_test_data[i].mismatch_names[j], strlen(name_check_test_data[i].mismatch_names[j]));
            EXPECT_EQ(NX_SECURE_X509_CERTIFICATE_DNS_MISMATCH, status);
        }
        
    }

    /* Test _nx_secure_x509_common_name_dns_check function with wrong certificates.  */
    for (i = 0; i < sizeof(name_check_bad_cert_test_data) / sizeof(X509_NAME_TEST_DATA); i++)
    {
        memset(&certificate, 0, sizeof(certificate));

        /* Initialize our certificate structure. */
        status = nx_secure_x509_certificate_initialize(&certificate, (UCHAR*)name_check_bad_cert_test_data[i].cert_data, name_check_bad_cert_test_data[i].cert_data_length, NX_NULL, 0, NX_NULL, 0, NX_SECURE_X509_KEY_TYPE_NONE);
        EXPECT_EQ(NX_SUCCESS, status);

        /* Test common name dns check with mismatch names. */
        for (j = 0; j < name_check_bad_cert_test_data[i].mismatch_names_count; j++)
        {
            status = _nx_secure_x509_common_name_dns_check(&certificate, name_check_bad_cert_test_data[i].mismatch_names[j], strlen(name_check_bad_cert_test_data[i].mismatch_names[j]));
            EXPECT_EQ(NX_SECURE_X509_CERTIFICATE_DNS_MISMATCH, status);
        }

    }

    printf("SUCCESS!\n");
    test_control_return(0);

}
